[TypeScript] Fix types in template (missing null-union)#4147
Conversation
Signed-off-by: Josua Frank <josua.frank@daimlertruck.com>
Contributor
|
@parrt blessed |
asvishnyakov
added a commit
to VirtoCommerce/vc-frontend
that referenced
this pull request
Mar 17, 2023
antlr4 has some issues with typescript typings, which should be fixed in 4.12.1: antlr/antlr4#4147 antlr/antlr4#4149
asvishnyakov
added a commit
to VirtoCommerce/vc-frontend
that referenced
this pull request
Mar 17, 2023
antlr4 has some issues with typescript typings, which should be fixed in 4.12.1: antlr/antlr4#4147 antlr/antlr4#4149
jimidle
pushed a commit
to jimidle/antlr4
that referenced
this pull request
Mar 28, 2023
Signed-off-by: Josua Frank <josua.frank@daimlertruck.com> Co-authored-by: Josua Frank <josua.frank@daimlertruck.com> Signed-off-by: Jim.Idle <jimi@idle.ws>
|
A lot of good TypeScript and JavaScript runtime improvements for 4.12.1. Might there be a release soon? |
Contributor
Author
|
I hope so, waiting for a release too :) |
Contributor
|
Also encountering this issue causing type checking to fail, hoping for 4.12.1 🙏 |
Member
|
@jimidle @ericvergnaud are at a good spot for release? |
Collaborator
|
I have lots of stuff I am working on, on and off for performance and
memory, but it’s experimental really and there is plenty in go for a new
release.
I will work on documentation today and see if there is anything I want to
send to dev. I’ll send GitHub actions for the new go release repo too.
Then I am ready when you are.
…On Wed, May 17, 2023 at 05:56 Terence Parr ***@***.***> wrote:
@jimidle <https://github.com/jimidle> @ericvergnaud
<https://github.com/ericvergnaud> are at a good spot for release?
—
Reply to this email directly, view it on GitHub
<#4147 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJ7TMBFHTYHUAQZTMC6XX3XGPZ2RANCNFSM6AAAAAAVKVWPGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Member
|
Ok. maybe I can try I release this weekend? It would be nice to freshen the internal Google copy as well. |
Collaborator
|
Working on it right now and will have my go stuff ready by end of day
Taipei time.
You release mechanism will need to copy the main branch of:
github.com/antlr/antlr4/runtime/Go/antlr/v4
to the main branch of
github.com/antlr-go/antlr
So, the top level of the repo.
Then the v4.x.y. tag should be issued against it. THe main development
source can be now be tagged exactly as you need it to be.
The go.mod for the runtime takes care of this being v4 and now the go get
command will resolve tags and so on correctly.
You may bring in the go runtime from the main branch of either repo of
course, depending how screwed up is Google's monorepo and the fact that
they don't use modules (they must jump through a lot of hoops to get that
to work, as modules are more or less required these days).
Jim
…On Wed, May 17, 2023 at 9:18 AM Terence Parr ***@***.***> wrote:
Ok. maybe I can try I release this weekend? It would be nice to freshen
the internal Google copy as well.
—
Reply to this email directly, view it on GitHub
<#4147 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJ7TMFSRDGM7PAFNAGYKG3XGQRPXANCNFSM6AAAAAAVKVWPGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Contributor
|
@parrt all green here, I just submitted 2 minor PRs for you to merge. Nothing else pending on my side. |
Member
Member
ok, is this something we can document in the release .md file? |
Collaborator
|
Ter,
The release of v4.13.0 is now live in the new release only repo and works
like a bought one.
The main .md file does already draw attention to the new repo, but of
course feel free to add to that if you don't think it is prominent enough.
My own projects are now using the new repo and pass all their tests. More
importantly, the tags work as they should and our users will now see real
tag numbers in their go.mod files:
module github.com/jimidle/mvparse
go 1.19
require (
github.com/antlr4-go/antlr/v4 v4.13.0
github.com/dominikbraun/graph v0.21.0
github.com/pyroscope-io/client v0.7.0
)
require (
github.com/pyroscope-io/godeltaprof v0.1.0 // indirect
golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect
)
So, when you make the release this weekend, there is nothing extra for you
to do over what you already do.
The go release notes tell you what to do to upgrade the go code within
Google to use the new repo - it is pretty trivial. Please look out for the
one change where you might need more than the import change. It is subtle
but trivial in that you may need to change the parser and lexer variable
definitions as they don't return an interface any more.
Most people won't even notice, but if they declared the type instead of
just using auto typing, then you will need to change the declaration to be
a * pointer. There are new interfaces into the runtime, but the runtime
interfaces are exactly the same. I doubt that you will even see this, but
regen the grammars and compile. If you get an error, then it is just this:
If your code looks like this:
var lexer = parser.NewMySqlLexer(nil)
var p = parser.NewMySqlParser(nil)
Or this:
lexer := parser.NewMySqlLexer(nil)
p := parser.NewMySqlParser(nil)
Then no changes need to be made. However, if you predeclared the parser and
lexer variables with their type, such as like this:
var lexer parser.MySqlLexer
var p parser.MySqlParser
// ...
lexer = parser.NewMySqlLexer(nil)
p = parser.NewMySqlParser(nil)
You will need to change your variable declarations to pointers (note the
introduction of the * below.
var lexer *parser.MySqlLexer
var p *parser.MySqlParser
// ...
lexer = parser.NewMySqlLexer(nil)
p = parser.NewMySqlParser(nil)
And that's it.
I will look out for your release announcement. This should be a nice
release for the go folk!
Jim
…On Fri, May 19, 2023 at 11:05 AM Terence Parr ***@***.***> wrote:
You release mechanism will need to copy the main branch of:
ok, is this something we can document in the release .md file?
—
Reply to this email directly, view it on GitHub
<#4147 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJ7TMC7Z2DKBVOJEEMPOLLXG3PQFANCNFSM6AAAAAAVKVWPGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Is there a way to pull this into a project? Can that be documented? |
Collaborator
|
It is documented.
https://github.com/antlr/antlr4/blob/master/doc/go-target.md
…On Mon, May 22, 2023 at 1:13 AM Matthew Dean ***@***.***> wrote:
@jimidle <https://github.com/jimidle>
The release of v4.13.0 is now live in the new release only repo
Is there a way to pull this into a project? Can that be documented?
—
Reply to this email directly, view it on GitHub
<#4147 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJ7TMEQP47BNWTVXIVW4TLXHJELHANCNFSM6AAAAAAVKVWPGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Collaborator
|
… On Mon, May 22, 2023 at 1:13 AM Matthew Dean ***@***.***> wrote:
@jimidle <https://github.com/jimidle>
The release of v4.13.0 is now live in the new release only repo
Is there a way to pull this into a project? Can that be documented?
—
Reply to this email directly, view it on GitHub
<#4147 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJ7TMEQP47BNWTVXIVW4TLXHJELHANCNFSM6AAAAAAVKVWPGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
the arrays
literalNamesandsymbolicNamesdo not only contain strings, but also null. Therefore we should reflect that in the TypeScript type to prevent build errors in strict mode.Thank you for your great work on the TypeScript target, loving it :)
Kind regards
Sharknoon